function getPageInitData(type){
	var iconStr = ''
	var methodStr = ''
	var detailM = ''
	var titleStr = type;
	var pageArr = []
	switch (type){
		case '学分申报':
			iconStr='ic_work_edu_01'
			methodStr="web.INMSpecialComm:FindActivityList"
			detailM = 'web.INMSpecialComm:GetActivity'
			pageArr = [{'title':'病区','key':'ActivityWardDesc'},{'title':'参与人','key':'ActivityNurseName'},
				{'title':'活动形式','key':'ActivityTypeDesc'},{'title':'参与形式','key':'ActivityParTypeDesc'}]
			break;
		case '培训登记':
			iconStr='ic_work_edu_02'
			methodStr="web.INMTeaComm:FindNurseTrain"
			detailM = 'web.INMTeaComm:GetNurseTrain'
			pageArr = [{'title':'培训项目','key':'TranProjectDesc'},{'title':'开始日期','key':'TranStDate'},
				{'title':'结束日期','key':'TranEndDate'},{'title':'完成状态','key':'TranIsFinishDesc'}]
			break;
		case '业务学习登记':
			iconStr='ic_work_edu_03'
			methodStr = 'web.INMHBComm:FindLocBusList'
			detailM = 'web.INMHBComm:GetLocBusStudy'
			pageArr = [{'title':'科室','key':'BusLocDesc'},{'title':'日期','key':'BusDate'},
				{'title':'级别','key':'BusLevelDesc'},{'title':'主题','key':'BusTopic'},
				{'title':'附件','key':'BusFile','type':'file'}]
			break;
		case '技能学习登记':
			iconStr='ic_work_edu_04'
			methodStr = 'web.INMHBComm:FindLocSkillList'
			detailM = 'web.INMHBComm:GetLocSkillStudy'
			pageArr = [{'title':'科室','key':'SkillLocDesc'},{'title':'日期','key':'SkillDate'},
				{'title':'主题','key':'SkillTopic'},{'title':'主讲人','key':'SkillHostName'}]
			break;
		case '外出学习登记':
			iconStr='ic_work_edu_05'
			methodStr = 'web.INMHBComm:FindOutStudyList'
			detailM = 'web.INMHBComm:GetOutStudy'
			pageArr = [{'title':'病区','key':'OutWardDesc'},{'title':'开始日期','key':'OutStDate'},
				{'title':'结束日期','key':'OutEndDate'},{'title':'学习级别','key':'OutLevelDesc'},
				{'title':'学习类型','key':'OutTypeDesc'},{'title':'是否本专业','key':'OutIsSpecialDesc'},
				{'title':'学习内容','key':'OutContent'}]
			break;
		default:
			break;
	}
	return {'icon':iconStr,'titleStr':titleStr,'method':methodStr,'detailM':detailM,'pageArr':pageArr}
}

function getTeachStatusKey(type){
	var statusKey=''
	switch (type){
		case '学分申报':
			statusKey = 'ActivityStatusDesc'
			break;
		case '培训登记':
			statusKey = 'StatusDesc'
			break;
		case '业务学习登记':
			statusKey = ''
			break;
		case '技能学习登记':
			statusKey = ''
			break;
		case '外出学习登记':
			statusKey = ''
			break;
		default:
			break;
	}
	return statusKey
}


function getFileHtml(valueStr){
	if (valueStr ==undefined) {
		valueStr = ''
	}
	var fileArr = valueStr.split('」')
	var html = ''
	for (var j = 0; j < fileArr.length;j++) {
		var oneUrl = fileArr[j]
		var index = oneUrl.lastIndexOf("\/");  
		var fileName=oneUrl.substring(index+1,oneUrl.length);
		if (j > 0) {
			html +=','
		}
		html +=fileName;
	}
	return html
}
//详情页面方法
function getDetailPageData(type){
	var detailM = ''
	switch (type){
		case '学分申报':
			detailM = 'web.INMSpecialComm:GetActivity'
			break;
		case '培训登记':
			detailM = 'web.INMSpecialComm:GetCase'
			break;
		case '业务学习登记':
			detailM = 'web.INMSpecialComm:GetStandard'
			break;
		case '技能学习登记':
			detailM = 'web.INMSpecialComm:GetStandard'
			break;
		case '外出学习登记':
			detailM = 'web.INMSpecialComm:GetStandard'
			break;
		default:
			break;
	}
	return {'method':detailM,'type':'RecMethod'}
}

//新建页面文件名
function getTeachNewPageName(type){
	var pagefileName=''
	switch (type){
		case '学分申报':
			pagefileName = 'teachNewScore'
			break;
		case '培训登记':
			pagefileName = 'teachNewTrain'
			break;
		case '业务学习登记':
			pagefileName = 'teachNewYW'
			break;
		case '技能学习登记':
			pagefileName = 'teachNewYW'
			break;
		case '外出学习登记':
			pagefileName = 'teachNewOut'
			break;
		default:
			break;
	}
	return pagefileName
}

//"S「臧阳爽「29「0,F「小花花「1「1,T「露露「2「2"
function getTeachNewAuthText(valueStr){
	var authArr = valueStr.split(',')
	var authDict = {'F':'','S':'','T':''}
	for (var i = 0; i < authArr.length;i++) {
		var oneStr = authArr[i]
		var oneArr = oneStr.split('「')
		authDict[oneArr[0]] +=  '<div class="oneAuth">'+oneArr[1]+'</div>'+
			'<div data-id="'+oneArr[2]+'" class="oneAuth">'+oneArr[2]+'</div>'
	}
	for (var id in authDict) {
		if (authDict[id] == '') {
			authDict[id] = '<div class="authSelectTip">添加作者</div>'
		}
	}
	return authDict
}

function dealUndefined(str){
	if (str == undefined || str == null) {
		return ''
	}
	return str
}

function getAbsPosition(item) {
	var actualLeft = item.offsetLeft;
	var actualTop = item.offsetTop;
	var current = item.offsetParent;
	while (current !== null) {
		actualLeft += (current.offsetLeft + current.clientLeft);
		actualTop += (current.offsetTop + current.clientTop);
		current = current.offsetParent;
	}
	return {
		'left': actualLeft,
		'top': actualTop
	};
}

function dealUndefined(str){
	return str==undefined?"":str
}

function getDetailPageArr(type){
	var keysArr
	switch (type){
		case '学分申报':
			keysArr = []
			break;
		case '培训登记':
			keysArr = [{'key':'TranStDate','type':'date','text':'开始日期'},{'key':'TranEndDate','type':'date','text':'结束日期'},
				{'key':'TranLevel','type':'list','text':'级别'},{'key':'TranProjectDesc','type':'list','text':'培训项目'},
				{'key':'TranTypeDesc','type':'list','text':'培训类型'},{'key':'TranProfessionDesc','type':'list','text':'专业组'},
				{'key':'TranModeDesc','type':'list','text':'培训方式'},{'key':'TranContext','type':'input','text':'培训内容'},
				{'key':'TranRemark','type':'input','text':'备注'},{'key':'TranChargeDesc','type':'list','text':'负责人'},
				{'key':'TranNurseDesc','type':'list','text':'培训对象'}]
			break;
		case '业务学习登记':
			keysArr = []
			break;
		case '技能学习登记':
			keysArr = []
			break;
		case '外出学习登记':
			keysArr = [{'key':'OutWardDesc','type':'list','text':'病区'},{'key':'OutNurseName','type':'list','text':'姓名'},
				{'key':'OutStDate','type':'date','text':'开始日期'},{'key':'OutEndDate','type':'date','text':'结束日期'},
				{'key':'OutLevelDesc','type':'list','text':'学习级别'},{'key':'OutTypeDesc','type':'list','text':'学习类型'},
				{'key':'OutIsSpecialDesc','type':'list','text':'是否本专业'},{'key':'OutSpecialGroupDesc','type':'list','text':'专业组'},
				{'key':'OutContent','type':'input','text':'学习内容'},{'key':'OutLocation','type':'input','text':'学习地点'},
				{'key':'OutScoreTypeDesc','type':'list','text':'学分类型'},{'key':'OutScore','type':'input','text':'学分'},
				{'key':'OutUnit','type':'input','text':'培训单位'},{'key':'OutCost','type':'input','text':'费用'}]
			break;
		default:
			break;
	}
	return keysArr
}